<!DOCTYPE html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  
 </head>
 <body>
  <script>
var arr = new Array();
for(i=0;i<5;i++){
arr[i]=new Array();     		//每个元素声明为一个新数组
for(j=0;j<8;j++){
    			 arr[i].push(i*j);
}
}
var len = arr.length;       	//获取arr的长度
var clen = arr[0].length; 	//获取子数组的长度
for(i=0;i<len;i++){       	//循环打印出二维数组
for(j=0;j<clen;j++){
    			 document.write(arr[i][j]);
    			 document.write(",");
}
document.write('<br/>');
}

  </script>
 </body>
</html>
